<template>
<div>
  <lay-menu 
    style="width: 150px" 
    :selected="selectedKey"
    theme="light"
    tree
  >
    <lay-menu-item key="1" title="系统管理">
      <template #icon>
        <lay-icon type="layui-icon-location"></lay-icon>
      </template>
      <lay-menu-item key="1-1" title="家居管理" @click="handleMenuClick('1-1')"></lay-menu-item>
    </lay-menu-item>
  </lay-menu>
</div>
</template>

<script>
export default {
  name: "Aside",
  data() {
    return {
      selectedKey: "1-1"
    }
  },
  methods: {
    handleMenuClick(key) {
      this.selectedKey = key;
      console.log("点击菜单:", key);
    }
  }
}
</script>

<style scoped>

</style>